package com.wwz.controller;

import com.wwz.pojo.Order;
import com.wwz.service.OrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Slf4j
@RestController
@RequestMapping("order")
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("{orderId}")
    public Order findById(@PathVariable("orderId") Long orderId){
        return orderService.findById(orderId);
    }
}
